﻿<%@ Page Language="C#" MasterPageFile="~/admin.master" AutoEventWireup="true" CodeBehind="admin-changepassword.aspx.cs"
 Inherits="MediaMonitor.admin.admin_changepassword" Title="Admin Panel - Change Password"%>
 <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Head" runat="server">
 <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script src="../rad-scripts/rad.js" type="text/javascript"></script>  
    </telerik:RadCodeBlock>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Body" runat="server">

<asp:UpdatePanel ID="pnlUpdate" runat="server">
<ContentTemplate>
<center>
    <div id="dvUpload" class="Box" style="width: 460px; padding-bottom: 15px; text-align:center;" align="center">
<table style="text-align:left" cellpadding="1" cellspacing="1" width="90%">
   <tr>
                        <td colspan="4">
                            <asp:ValidationSummary ID="vSummary" runat="server" ValidationGroup="form" />
                            <asp:Label runat="server" Visible="false" id="lblResult"></asp:Label>
                        </td>
                    </tr>
 
  <tr>
        <th>User Name:</th>
        <td style="padding-top:15px;">
        <asp:Label ID="lblUserName" runat="server"><%MembershipUser memUsr= System.Web.Security.Membership.GetUser();
                                   if (memUsr != null) {
                                       Response.Write(memUsr.UserName);
                                   }
                                        %></asp:Label>
                                        
                                   
         <br /> <br />
         </td>
    </tr>

   <tr>
        <th>Current Password:</th>
        <td>
        <asp:TextBox ID="tbCurrentPassword"  TextMode="Password"  Width="80%" MaxLength="20" runat="server"/>
       
         <asp:RequiredFieldValidator ID="rfCurrentPassword" runat="server" ControlToValidate="tbCurrentPassword" Display="Dynamic" ErrorMessage="Current password required" Text="*" ValidationGroup="form" />
         <br />
         </td>
    </tr>

     <tr>
        <th>New Password:</th>
        <td><asp:TextBox ID="tbNewPassword" runat="server" TextMode="Password" width="80%" MaxLength="20" /> 
         <asp:RequiredFieldValidator ID="rfNewPassword" runat="server" ControlToValidate="tbNewPassword" Display="Dynamic" ErrorMessage="New password required" Text="*" ValidationGroup="form" />
        <br />
         </td>
    </tr>
     <tr>
        <th>Confirm Password:</th>
        <td><asp:TextBox ID="tbNewConfirmPassword" runat="server" TextMode="Password" width="80%" MaxLength="20"/> 
          <asp:RequiredFieldValidator ID="rfNewConfirmPassword" runat="server" ControlToValidate="tbNewConfirmPassword" Display="Dynamic" ErrorMessage="Confirm password required" Text="*" ValidationGroup="form" />
        <asp:CompareValidator runat="server" id="cmpPasswords" Display="Dynamic" ControlToValidate="tbNewConfirmPassword" ControlToCompare="tbNewPassword" Operator="Equal" Type="String" Text="*" ErrorMessage="New Password and Confirm Password do not match!" ValidationGroup="form"/>
        <br />
         </td>
    </tr>
     <tr>
        <td></td>
        <td>
            <br />
           <asp:ImageButton ID="btnChangePassword" runat="server"  SkinID="submit" 
                ValidationGroup="form" OnClick="btnChangePassword_Click" />
                 
        </td>
    </tr>
</table>
  </div>  </center>
  </ContentTemplate>
   <Triggers>
            <asp:PostBackTrigger ControlID="btnChangePassword" />
          
        </Triggers>
  </asp:UpdatePanel>
</asp:Content>
